﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HYJHouseKeeping.DAL;
using HYJHouseKeeping.Model;

namespace HYJHouseKeeping.BLL
{
    /// <summary>
    /// 员工业务逻辑层
    /// </summary>
    public class EmployeeManager
    {
        private EmployeeService employeeService = new EmployeeService();
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="empID">员工编号</param>
        /// <param name="password">登录密码</param>
        /// <param name="employee">员工对象</param>
        /// <returns></returns>
        public bool LogIn(int empID,string password ,out Employee employee) 
        {
            Employee emp = employeeService.GetEmployeeById(empID);
            employee = emp;
            if (emp!=null)
            {
                if (emp.Password==password)
                {
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
                    
>>>>>>> 57f1921b0e85f4513a9adf3292441c4df1cdec45
>>>>>>> dbb22510f291220125670d51cee5661d77e817f4
                    return true;
                }
            }
            return false;
        }
<<<<<<< HEAD
=======
<<<<<<< HEAD
>>>>>>> dbb22510f291220125670d51cee5661d77e817f4
        /// <summary>
        /// 新增员工信息
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        public bool AddEmployee(Employee employee)
        {
            return this.employeeService.AddEmployee(employee);
        }
<<<<<<< HEAD
=======
=======
>>>>>>> 57f1921b0e85f4513a9adf3292441c4df1cdec45
>>>>>>> dbb22510f291220125670d51cee5661d77e817f4
    }
}
